<!--
  #%L
  connected
  %%
  Copyright (C) 2017 Vertispan
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>J2CL</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="css/app.css">
    <script language='javascript' src='org.kie.lienzo.LienzoShowcase/org.kie.lienzo.LienzoShowcase.nocache.js'></script>
</head>


<body>
<div class="container">

    <div id="nav" class="nav">
    </div>

    <div id="main" class="content">
        <div id="top" style="display:none"></div>
    </div>

    <div id="console" class="console">
        <div>Console</div>
    </div>

</div>

<script type="application/javascript">
    window.onload = function(e) {
        updateScroll();
        //fit();
    }
    //
    // window.onresize = function(e) {
    //     fit();
    // }

    function updateScroll() {
        var element = document.getElementById("console");
        element.scrollTop = element.scrollHeight;
    }

    // function fit() {
    //     var canvas = document.getElementById("canvas");
    //     var content = document.getElementById("content");
    //
    //     var cs = getComputedStyle(content);
    //
    //     var paddingX = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight);
    //     var paddingY = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom);
    //
    //     var borderX = parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth);
    //     var borderY = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
    //
    //     // Element width and height minus padding and border
    //     var width  = content.offsetWidth - paddingX - borderX;
    //     var height = content.offsetHeight - paddingY - borderY;
    //
    //     canvas.width = width;
    //     canvas.height = height;
    // }

</script>

</body>
</html>